<template>
  <div class="RecommendedTagUI">
    <div :class="`tag-container level_${level}`">
      推荐{{level}}
    </div>
  </div>
</template>

<script>
import { defineComponent } from 'vue';

export default defineComponent ({
  name: "RecommendedTagUI",
  props: {
    level: {
      type: Number
    }
  }
})
</script>

<style scoped lang="scss">
$tag-color1: linear-gradient(180deg, #FF74C9 0%, #E50113 100%);
$tag-color1_c: #f856b9;
$tag-color2: linear-gradient(180deg, #FDD62D 0%, #FAAD14 100%);
$tag-color2_c: #ffd629;
$tag-color3: linear-gradient(180deg, #BA71F4 0%, #7D46FF 100%);
$tag-color3_c: #BA71F4;
$tag-color4: linear-gradient(180deg, #00D6AE 0%, #00AC76 100%);
$tag-color4_c: #02cba5;
$tag-color5: linear-gradient(180deg, #629FF9 0%, #336FF1 100%);
$tag-color5_c: #427EF4;
.RecommendedTagUI {
  height: 15px;
  line-height: 15px;
  display: inline-block;
  .tag-container {
    padding-right: 3px;
    font-size: 9px;
    color: #fff;
    position: relative;
  }

  .tag-container::after {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid;
    background: $tag-color1;
  }
  .tag-container.level_0 { background: $tag-color1; }
  .tag-container.level_1 { background: $tag-color1; }
  .tag-container.level_2 { background: $tag-color2; }
  .tag-container.level_3 { background: $tag-color3; }
  .tag-container.level_4 { background: $tag-color4; }
  .tag-container.level_0::after { border-right-color: $tag_color1_c; }
  .tag-container.level_1::after { border-right-color: $tag_color1_c; }
  .tag-container.level_2::after { border-right-color: $tag_color2_c; }
  .tag-container.level_3::after { border-right-color: $tag_color3_c; }
  .tag-container.level_4::after { border-right-color: $tag_color4_c; }
}
</style>